﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using Visifire.Gauges;

namespace CPPEI.Coolzon.UI.DataPartLib
{
    public partial class DataGaugeDoubleCircularScale
    {
        public BarIndicator SetBar2Indicator(BarIndicator bar2Indicator)
        {
            bar2Indicator.BorderBrush = Bar2BorderBursh==null? null : Bar2BorderBursh.Brush;
            bar2Indicator.BorderThickness = Bar2BorderThickness;
            bar2Indicator.Background = Bar2Background==null? null : Bar2Background.Brush;
            bar2Indicator.LabelBackground = Bar2LabelBackground==null? null : Bar2LabelBackground.Brush;
            bar2Indicator.LabelEnabled = Bar2LabelEnabled;
            bar2Indicator.LabelFontColor = Bar2LabelFontColor==null? null : Bar2LabelFontColor.Brush;
            bar2Indicator.LabelFontFamily = Bar2LabelFontFamily;
            bar2Indicator.LabelFontWeight = Bar2LabelFontWeight;
            bar2Indicator.Placement = Bar2Placement;
            bar2Indicator.ShadowEnabled = Bar2ShadowEnabled;
            bar2Indicator.ToolTipText = Bar2ToolTipText;


            bar2Indicator.DistanceFromScale = Bar2DistanceFromScale;
            bar2Indicator.StartWidth = Bar2StartWidth;
            bar2Indicator.EndWidth = Bar2EndWidth;

            return bar2Indicator;
        }
        private BrushEx bar2BorderBursh;
        private Thickness bar2BorderThickness;
        private BrushEx bar2Background;
        private BrushEx bar2LabelBackground;
        private bool bar2LabelEnabled;
        private BrushEx bar2LabelFontColor;
        private FontFamily bar2LabelFontFamily;
        private FontWeight bar2LabelFontWeight;
        private PlacementTypes bar2Placement;
        private bool bar2ShadowEnabled;
        private string bar2ToolTipText;


        private double bar2DistanceFromScale;
        private double? bar2StartWidth;
        private double? bar2EndWidth;

        [Category("第二表盘进度条")]
        [DisplayName("第二表盘进度条边框颜色")]
        [Description("Bar2BorderBursh")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Bar2BorderBursh", "进度条颜色")]
        public BrushEx Bar2BorderBursh
        {
            get
            {
                return bar2BorderBursh;
            }

            set
            {
                bar2BorderBursh = value;
                Refresh();
            }
        }

        [Category("第二表盘进度条")]
        [DisplayName("第二表盘进度条边框大小")]
        [Description("Bar2BorderThickness")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Bar2BorderThickness", "进度条边框大小")]
        public Thickness Bar2BorderThickness
        {
            get
            {
                return bar2BorderThickness;
            }

            set
            {
                bar2BorderThickness = value;
                Refresh();
            }
        }

        [Category("第二表盘进度条")]
        [DisplayName("第二表盘进度条背景颜色")]
        [Description("Bar2Background")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Bar2Background", "进度条背景颜色")]
        public BrushEx Bar2Background
        {
            get
            {
                return bar2Background;
            }

            set
            {
                bar2Background = value;
                Refresh();
            }
        }

        [Category("第二表盘进度条")]
        [DisplayName("第二表盘进度条标签背景颜色")]
        [Description("Bar2LabelBackground")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Bar2LabelBackground", "进度条标签背景颜色")]
        public BrushEx Bar2LabelBackground
        {
            get
            {
                return bar2LabelBackground;
            }

            set
            {
                bar2LabelBackground = value;
                Refresh();
            }
        }

        [Category("第二表盘进度条")]
        [DisplayName("第二表盘进度条标签是否可用")]
        [Description("Bar2LabelEnabled")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Bar2LabelEnabled", "进度条标签是否可用")]
        public bool Bar2LabelEnabled
        {
            get
            {
                return bar2LabelEnabled;
            }

            set
            {
                bar2LabelEnabled = value;
                Refresh();
            }
        }

        [Category("第二表盘进度条")]
        [DisplayName("第二表盘进度条标签字体颜色")]
        [Description("Bar2LabelFontColor")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Bar2LabelFontColor", "进度条标签字体颜色")]
        public BrushEx Bar2LabelFontColor
        {
            get
            {
                return bar2LabelFontColor;
            }

            set
            {
                bar2LabelFontColor = value;
                Refresh();
            }
        }

        [Category("第二表盘进度条")]
        [DisplayName("第二表盘进度条标签字体")]
        [Description("Bar2LabelFontFamily")]
        [Editor(typeof(UI.XProperty.Editors.XFontFamilyEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Bar2LabelFontFamily", "进度条标签字体")]
        public FontFamily Bar2LabelFontFamily
        {
            get
            {
                return bar2LabelFontFamily;
            }

            set
            {
                bar2LabelFontFamily = value;
                Refresh();
            }
        }

        [Category("第二表盘进度条")]
        [DisplayName("第二表盘进度条标签字体粗细")]
        [Description("Bar2LabelFontWeight")]
        [Editor(typeof(UI.XProperty.Editors.XFontWeightEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Bar2LabelFontWeight", "进度条标签字体粗细")]
        public FontWeight Bar2LabelFontWeight
        {
            get
            {
                return bar2LabelFontWeight;
            }

            set
            {
                bar2LabelFontWeight = value;
                Refresh();
            }
        }

        [Category("第二表盘进度条")]
        [DisplayName("第二表盘进度条位置")]
        [Description("Bar2Placement")]
        [Editor(typeof(UI.DataPartLib.XProperty.Editors.XPlacementTypesEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Bar2Placement", "进度条位置")]
        public PlacementTypes Bar2Placement
        {
            get
            {
                return bar2Placement;
            }

            set
            {
                bar2Placement = value;
                Refresh();
            }
        }

        [Category("第二表盘进度条")]
        [DisplayName("第二表盘进度条是否显示阴影")]
        [Description("Bar2ShadowEnabled")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Bar2ShadowEnabled", "进度条是否显示阴影")]
        public bool Bar2ShadowEnabled
        {
            get
            {
                return bar2ShadowEnabled;
            }

            set
            {
                bar2ShadowEnabled = value;
                Refresh();
            }
        }

        [Category("第二表盘进度条")]
        [DisplayName("第二表盘进度条提示")]
        [Description("Bar2ToolTipText")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Bar2ToolTipText", "进度条提示")]
        public string Bar2ToolTipText
        {
            get
            {
                return bar2ToolTipText;
            }

            set
            {
                bar2ToolTipText = value;
                Refresh();
            }
        }

        [Category("第二表盘进度条")]
        [DisplayName("第二表盘进度条距离标尺距离(0-1)")]
        [Description("Bar2DistanceFromScale")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Bar2DistanceFromScale", "进度条距离标尺距离(0-1)")]
        public double Bar2DistanceFromScale
        {
            get
            {
                return bar2DistanceFromScale;
            }

            set
            {
                bar2DistanceFromScale = value;
                Refresh();
            }
        }

        [Category("第二表盘进度条")]
        [DisplayName("第二表盘进度条开始宽度(0-1)")]
        [Description("Bar2StartWidth")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Bar2StartWidth", "进度条开始宽度(0-1)")]
        public double? Bar2StartWidth
        {
            get
            {
                return bar2StartWidth;
            }

            set
            {
                bar2StartWidth = value;
                Refresh();
            }
        }

        [Category("第二表盘进度条")]
        [DisplayName("第二表盘进度条结束宽度(0-1)")]
        [Description("Bar2EndWidth")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleNullEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Bar2EndWidth", "进度条结束宽度(0-1)")]
        public double? Bar2EndWidth
        {
            get
            {
                return bar2EndWidth;
            }

            set
            {
                bar2EndWidth = value;
                Refresh();
            }
        }
    }
}
